/*
 * @Author: yixin 
 * @Date: 2019-12-07 22:16:52 
 * @Last Modified by: yixin
 * @Last Modified time: 2020-01-10 16:04:31
 * 雷达
 */

import React, { PureComponent } from 'react';
import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/radar';
import 'echarts/lib/component/legend';
import styles from './radar.less';

export default class Radar extends PureComponent {

  componentDidMount() {
    this.radar = echarts.init(document.getElementById('radar'));
    this.radar.setOption({
      radar: {
        indicator: [
          { name: '泵送方量'},
          { name: '工作时间'},
          { name: '设备利用率',},
          { name: '有效泵送率',},
          { name: '工程油耗',},
       ],
      },
      series: [{
          name: '工程画像',
          type: 'radar',
          data: this.props.data
      }]
    })
  }

  render() {
    return (
      <div id="radar" className={styles.radar}>
        
      </div>
    )
  }

}
